package com.zl.task.controller;


import com.zl.task.service.IServiceIndustryService;
import com.zl.task.util.resp.RespResult;
import com.zl.task.util.resp.RespUtil;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yinlingeng
 * @since 2021-07-23
 */
@RestController
public class ServiceIndustryController {

    @Autowired
    private IServiceIndustryService industryService;

    @ApiOperation("行业列表")
    @GetMapping("/listIndustry")
    public RespResult<Object> listIndustry() {
        try {
            return RespUtil.success(industryService.listIndustry());
        } catch (Exception e) {
            e.printStackTrace();
            return RespUtil.error(e.getMessage());
        }
    }

}

